package com.itheima.test1;

public class Test {
    public static void main(String[] args) {
        Dog d = new Dog();
        fun(d);
        fun(new Animal() {
            @Override
            public void show() {
                System.out.println("展示....");
            }
        });
    }
    public static void fun(Animal a ){
        a.show();
    }
}

class Dog implements Animal{
    @Override
    public void show() {
        System.out.println("展示");
    }
}

interface Animal{
    public void show();
}